import request from '@/utils/request'

// 查询库存盘点管理列表
export function listCcStockInventory(query) {
  return request({
    url: '/business/CcStockInventory/list',
    method: 'get',
    params: query
  })
}
// 查询库存盘点管理列表
export function selectCcStockInventoryMain(query) {
  return request({
    url: '/business/CcStockInventory/selectCcStockInventoryMain',
    method: 'get',
    params: query
  })
}

// 查询库存盘点管理详细
export function getCcStockInventory(id) {
  return request({
    url: '/business/CcStockInventory/' + id,
    method: 'get'
  })
}

// 新增库存盘点管理
export function addCcStockInventory(data) {
  return request({
    url: '/business/CcStockInventory',
    method: 'post',
    data: data
  })
}
export function handleInventory(inventoryWay) {
  return request({
    url: '/business/CcStockInventory/handleInventory/'+inventoryWay,
    method: 'post',
    timeout:30*1000
  })
}

export function inventoryJs(inventoryCode) {
  return request({
    url: '/business/CcStockInventory/inventoryJs/'+inventoryCode,
    method: 'post',
    timeout:30*1000
  })
}

// 修改库存盘点管理
export function updateCcStockInventory(data) {
  return request({
    url: '/business/CcStockInventory',
    method: 'put',
    data: data
  })
}

// 删除库存盘点管理
export function delCcStockInventory(id) {
  return request({
    url: '/business/CcStockInventory/' + id,
    method: 'delete'
  })
}
